package com.x.chalk.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.x.chalk.entity.SignTask;
import com.x.chalk.vo.R;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface SignTaskDao extends BaseMapper<SignTask> {

    @Select("select score from t_signtask where taskid=#{taskid}")
    int selectScore(Long taskid);

    @Select("select flag from t_signtask where uid=#{uid} and taskid=#{taskid}")
    int queryFlag(Long uid,Long taskid);

    @Update("update t_signtask set flag=#{flag} where uid=#{uid} and taskid=#{taskid}")
    int updateFlag(Integer flag, Long uid,Long taskid);
}
